﻿using System;
using System.Collections.Generic;
using System.Text;

namespace EntityFrameworkCore
{
   public class Repository<TEntity> : IRepository<TEntity> where TEntity : class
    {
        private readonly AuditDbContext _auditDbContext = null;
        public Repository(AuditDbContext auditDbContext)
        {
            this._auditDbContext = auditDbContext;
        }


        public void Add(TEntity entity)
        {
            _auditDbContext.Set<TEntity>().Add(entity);
            _auditDbContext.SaveChanges();
        }
    }
}
